<?php

class User_Backend_Security extends Kernel_Manager_FilteredList
{
    
    /**
     * Конструктор
     *
     * @param   array   $params
     */
    public function __construct($params = array())
    {
        parent::__construct($params);
        
        // add "change-password" action
        $this->_addAction('change-password', self::ACTION_ITEM);
    }
    
    protected function _getActionParams($name) 
    {
        $params = parent::_getActionParams($name);
        
        switch ($name)
        {
            case 'change-password':
                $params = array('redirect_url' => self::_tmp_url(array('id' => '%id')));
                break;
        }
        
        if (in_array($name, array('list', 'edit', 'add'))) {
            $params['role'] = $this->_filter;
        }
        
        
        return $params;
    }
    
    /**
     * @desc Return manager components package.
     *
     * @return  string
     */
    protected function _package() 
    {
        return __CLASS__;
    }
    
}
